package team3132.commands;

import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.CommandGroup;

/**
 * Generic class to run commands in sequence.
 * No list or generics in Java 1.3 so many constructors.
 */
public class SequentialCommandGroup extends CommandGroup {

  /**
   * Run one command
   */
  public SequentialCommandGroup(Command cmd1) {
    this.addSequential(cmd1);
  }

  /**
   * Run two commands in sequence
   */
  public SequentialCommandGroup(Command cmd1, Command cmd2) {
    this.addSequential(cmd1);
    this.addSequential(cmd2);
  }

  /**
   * Run three commands in sequence
   */
  public SequentialCommandGroup(Command cmd1, Command cmd2, Command cmd3) {
    this.addSequential(cmd1);
    this.addSequential(cmd2);
    this.addSequential(cmd3);
  }

  /**
   * Run four commands in sequence
   */
  public SequentialCommandGroup(Command cmd1, Command cmd2, Command cmd3, Command cmd4) {
    this.addSequential(cmd1);
    this.addSequential(cmd2);
    this.addSequential(cmd3);
    this.addSequential(cmd4);
  }

  /**
   * Run five commands in sequence
   */
  public SequentialCommandGroup(Command cmd1, Command cmd2, Command cmd3, Command cmd4, Command cmd5) {
    this.addSequential(cmd1);
    this.addSequential(cmd2);
    this.addSequential(cmd3);
    this.addSequential(cmd4);
    this.addSequential(cmd5);
  }
}
